using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using Microsoft.VisualBasic;
using System.Collections;
using System.Diagnostics;
using System;


public partial class InsertLineDialog
{

    public string Res = "Cancel";
    public int h;

    public InsertLineDialog()
    {
        InitializeComponent();
    }
    public void TextBox1_TextChanged(object sender, TextChangedEventArgs e)
    {
        try
        {
            h = Convert.ToInt32(TextBox1.Text);
        }
        catch (Exception)
        {
            TextBox1.Clear();
        }
        if (TextBox1.Text.Length > 0)
        {
            OKButton.IsEnabled = true;
        }
        else
        {
            OKButton.IsEnabled = false;
        }
    }

    public void OKButton_Click(object sender, RoutedEventArgs e)
    {
        Res = "OK";
        Close();
    }

    public void InsertLineDialog_Loaded(object sender, RoutedEventArgs e)
    {
        if (MS.WindowsAPICodePack.Internal.CoreHelpers.RunningOnVista || MS.WindowsAPICodePack.Internal.CoreHelpers.RunningOnWin7)
        {
            AppHelper.ExtendGlassFrame(this, new Thickness(-1, -1, -1, -1));
        }
    }
}

